-- GENERATED SPELL FOR [Mana Snapper] --


function spell0_18883(pUnit, Event) --@De-Materialize,Self--
pUnit:FullCastSpellOnTarget(34814,pUnit)
pUnit:RegisterEvent('Sorts_18883', 628, 1)
end

function spell1_18883(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(37176,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18883', 5000, 1)
end

function spell2_18883(pUnit, Event) --@Phase Slip,Self--
pUnit:FullCastSpellOnTarget(36574,pUnit)
pUnit:RegisterEvent('Sorts_18883', 8337, 1)
end

function Sorts_18883(pUnit, Event)
local choix_sorts_18883 = math.random(0, 2)
if choix_sorts_18883 == 0 then
pUnit:RegisterEvent('spell0_18883', 1, 1)
end
if choix_sorts_18883 == 1 then
pUnit:RegisterEvent('spell1_18883', 1, 1)
end
if choix_sorts_18883 == 2 then
pUnit:RegisterEvent('spell2_18883', 1, 1)
end
end

function mob18883_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18883', math.random(1500, 3000), 1)
end

function mob18883_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18883_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18883_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18883, 1, 'mob18883_Action')
RegisterUnitEvent(18883, 2, 'mob18883_Leave')
RegisterUnitEvent(18883, 3, 'mob18883_Kill')
RegisterUnitEvent(18883, 4, 'mob18883_Die')
